<?php $SS = new Zend_Session_Namespace ('Language');

$lang = $SS->language;

$langProduction = "Nguồn gốc";
if($lang == "en"){
$langProduction = "Production";  
}elseif($lang == "chi"){
$langProduction = "生產";
}

$langDetail = "Chi tiết";
if($lang == "en"){
$langDetail = "Detail";  
}elseif($lang == "chi"){
$langDetail = "細節";
}

$langPrice = "Giá";
if($lang == "en"){
$langPrice = "Price";  
}elseif($lang == "chi"){
$langPrice = "價格";
}
?>
<div class="span8">
                        <div id="myCarousel" class="carousel slide">
                            <div class="carousel-inner">
                                <?php foreach($this->data as $key=>$value):?>
                                <?php $nameSlide = $value['title'];
                                      if($lang == "en"){
                                      $nameSlide = $value['title_en'];  
                                      }elseif($lang == "chi"){
                                      $nameSlide = $value['title_china'];
                                      }
                                      
                                      //description
                                      
                                      $descSlide = $value['description'];
                                      if($lang == "en"){
                                      $descSlide = $value['description_en'];  
                                      }elseif($lang == "chi"){
                                      $descSlide = $value['description_china'];
                                      }
                                    ?>
                                <div class="item <?php echo $key==0 ? "active" : "";?>">
                                    <div class="row-fluid">
                                        <div class="span6">
                                            <img src="<?php echo $this->baseUrl()."/upload/".$value['image'];?>" alt="<?php echo $lang == "en" ? $value['title_en'] : $value['title'];?>" width="310" height="270"/>
                                        </div>
                                        <div class="span6">
                                            <div class="carousel-caption">
                                                <h4><?php echo $nameSlide;?></h4>
                                                <span><?php echo $langProduction;?>: <?php echo $value['madein'];?></span>
                                                <span><?php echo $langPrice;?>: <?php echo number_format($value['price']);?> VND/kg</span>
                                                <p><?php echo $descSlide;?></p>
                                                <?php if($value['product_id'] == 0){
                                                    $link = $value['link'];
                                                }else{
                                                   $link = "/san-pham/".$value['product_id']."-".$this->cleanstring($value['product_name']).".html"; 
                                                }?>
                                                <a href="<?php echo $link;?>" target="_blank"> >> <?php echo $langDetail;?></a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <?php endforeach;?>
                            </div>
                            <a class="left carousel-control" href="#myCarousel" data-slide="prev"></a>
                            <a class="right carousel-control" href="#myCarousel" data-slide="next"></a>
                        </div>
                    </div>